﻿using System;
using System.Windows.Forms;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting.Drawing;
using System.Drawing;
using System.Linq;
using VNPT.Report.DoiSoat;

namespace VNPT.Report
{
    public class Reporter
    {
        public void Print_SanLuongGTGT_DLK(object obj,int DNK_ENV_5002x, int DNK_VTL_5006x, int Thang, int Nam)
        {
            using (var report = new rSanLuongGTGT())
            {
                BindingSource bs = (BindingSource)report.DataSource;
                bs.DataSource = obj;
                report.Parameters["DNK_VTL_5006x"].Value = DNK_VTL_5006x;
                report.Parameters["DNK_ENV_5002x"].Value = DNK_ENV_5002x;
                report.Parameters["pDNK_TONG"].Value = DNK_ENV_5002x + DNK_VTL_5006x;
                report.Parameters["pNgayThang"].Value = string.Format("(Tháng {0} năm {1})",Thang, Nam);
                //report.Parameters["pNguoiLap"].Value = DoiSoat.r1800_1900_DLK_DNK;
                report.ShowPreviewDialog();
            }
        }
        public void Print_SanLuong_1088(object obj, int Thang, int Nam)
        {
            using (var report = new rSanLuong_1088())
            {
                BindingSource bs = (BindingSource)report.DataSource;
                bs.DataSource = obj;
                report.Parameters["pThang"].Value = string.Format("(Tháng {0} năm {1})", Thang, Nam);

                report.ShowPreviewDialog();
            }
        }
    }
}
